import dayjs from 'dayjs'

export const column = [
  {
    prop: 'childrenName',
    label: '姓名'
  },
  {
    prop: 'className',
    label: '班级'
  },
  {
    prop: 'labelCount',
    label: '儿心量表测评次数'
  },
  {
    prop: 'contentCount',
    label: '格塞尔发育量次数'
  },
  {
    prop: 'action',
    label: '操作'
  }
]

export const childrenColumn = [
  {
    prop: 'name',
    label: '姓名'
  },
  {
    prop: 'month',
    label: '月龄'
  },
  {
    prop: 'birthday',
    label: '出生日期',
    render: (row) => dayjs(row.birthday).format('YYYY/MM/DD')
  },
  {
    prop: 'clssesName',
    label: '班级'
  }
]

export const seachConfigClient = (classes) => {
  return [
    {
      key: 'classId',
      label: '班级',
      type: 'select',
      fieldProps: {
        options: classes,
        props: { value: 'id', label: 'name' }
      }
    },
    {
      key: 'name',
      label: '学生姓名'
    }
  ]
}
